<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<fieldset><legend>治疗过程</legend>
<table class="list">
	<thead>
		<tr>
			<th>日&nbsp;&nbsp;&nbsp;期</th>
			<th>空腹血糖</th>
			<th>餐后2h血糖</th>
			<th>运动量</th>
			<th>胰岛素</th>
			<th>操&nbsp;&nbsp;&nbsp;作</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach items="${patient.treatments}" var="treatment"
			varStatus="varStatus">
			<c:set var="tr_class"
				value="${varStatus.index % 2 == 0 ? 'odd' : 'even'}" />
			<tr class="${tr_class}">
				<td><c:out value="${treatment.treatmentTime}" /></td>
				<td><c:out value="${treatment.emptyBloodSugar}" />&nbsp;mmol/L</td>
				<td><c:out value="${treatment.twoHourBloodSugar}" />&nbsp;mmol/L</td>
				<td><c:out value="${treatment.sportTime}" />&nbsp;分钟</td>
				<td><c:out value="${treatment.insulinDrugName}" /></td>
				<td><c:url value="/treatment/view.do" var="treatmentView">
					<c:param name="treatmentId" value="${treatment.treatmentId}" />
				</c:url> <c:url value="/treatment/edit.do" var="treatmentEdit">
					<c:param name="treatmentId" value="${treatment.treatmentId}" />
				</c:url><a href="${treatmentView}">[查&nbsp;看]</a>&nbsp;&nbsp;&nbsp;<a
					href="${treatmentEdit}">[修&nbsp;改]</a></td>
			</tr>
		</c:forEach>
	</tbody>
</table>
</fieldset>
<div class="strip"><a class="submit"
	href="${ctx}/treatment/new.do?patientId=${patient.patientId}">新&nbsp;&nbsp;&nbsp;建</a>
</div>